GOAP (Goal-Oriented Action Planning)

  • Definition of Goals and definitions of actions to execute those Goals.

  • Each possible action has a weight and conditionals to be executed, generating a "pseudo-score" for each possible action to fulfill the Goal, choosing the best action at the end.

  • Goals must be ordered so you need to execute the first Goal in the list before moving to the next.

  • Has an initially complex and confusing implementation for sure.

  • Can have some performance issues since each entity must consider every possible plan of actions to fulfill the Goal before taking any action.

    • In the worst case, one has $O((nm)^d)$, where $n$ is the number of possible actions, $m$ is the number of goals and $d$ is the depth of the path.

    • Because of this, "design short plans" is repeated billions of times due to performance concerns.

    • For this reason, A* is also normally used to do the "pathfinding" to choose the best action within the Tree, to optimize the speed of this decision-making in the Tree.

  • Has some visualization and debugging difficulties.

  • Supposedly allows "emergent behavior", but that is quite obtuse; this kind of thing is not obvious due to implementation complexity. Very likely Utility AI can achieve more emergence more easily.

  • *Impressions:

    • I found the definition of a 'goal' very abstract, sometimes giving the impression that something could be defined both as an action and as a goal.

    • Seems very oriented to stealth games or games with autonomous NPCs, but it is somewhat irrelevant for combat moments.

    • I did not like it very much overall, as decision-making and goal definition are somewhat abstract.

    • I have the impression that the strategy seems very "literal", but its implementation is somewhat confusing because of that.

    • Considering the target cases for this strategy, using Utility AI sounds better because it is more organic and allows emergence in NPC behavior.

Games that use it

  • F.E.A.R. .

    • Meh, basically a documentary, not very technical.

  • Shadow of Mordor.

    • Same company as F.E.A.R.

  • Condemned 1 and 2.

    • Same company as F.E.A.R.

  • Tomb Raider.

  • Rise of Tomb Raider.

Explanations

Examples